<?php
$page=$_GET["page"];
if (file_exists($page)) {
    $relative_url = $page;
    header("Location: http://" . $_SERVER['HTTP_HOST']
                     . dirname($_SERVER['PHP_SELF'])
                     . "/" . $relative_url); /* Redirect browser */ 
    return;
}
echo "You have to generate the page and relevent schemas (Click the 'Generate' icon) before the preview can be shown";
?>
